
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>用户主页</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="fly,layui,前端社区">
  <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
  <link rel="stylesheet" href="../../res/layui/css/layui.css">
  <link rel="stylesheet" href="../../res/css/global.css">
</head>
<body style="margin-top: 65px;">

<div th:replace="fragments::header"></div>

<div class="fly-home fly-panel" style="background-image: url();">
  <img th:if="${user.head==null}" src="https://tva1.sinaimg.cn/crop.0.0.118.118.180/5db11ff4gw1e77d3nqrv8j203b03cweg.jpg">
  <img th:if="${user.head!=null}" th:src="@{/upload/}+${user.head}">
  <i class="iconfont icon-renzheng" th:if="${user.cert!=null}"  title="Fly社区认证"></i>
  <h1>
    <span th:text="${user.nickname}">贤心</span>
    <i class="iconfont icon-nan" th:if="${user.sex=='男'}"></i>
    <i class="iconfont icon-nv" th:if="${user.sex=='女'}"></i>
    <!-- <i class="iconfont icon-nv"></i>  -->
    <i class="layui-badge fly-badge-vip" 
		    th:if="${user.vip>0}"
          	th:text="'VIP'+${#strings.length(user.vip)}">VIP3</i>
          	
    <span style="color:#c00;" th:if="${user.role==1}">（管理员）</span>
    <!--
    <span style="color:#5FB878;">（社区之光）</span>
    -->
    <span th:if="${user.status==1}">（该号已被封）</span>
  </h1>

  <p style="padding: 10px 0; color: #5FB878;" th:if="${user.cert!=null}" th:text="'认证信息：'+${user.cert}">认证信息：layui 作者</p>

  <p class="fly-home-info">
    <i class="iconfont icon-kiss" title="飞吻"></i>
    	<span style="color: #FF7200;"><span th:text="${user.kiss}">66666</span> 飞吻</span>
    <i class="iconfont icon-shijian"></i><span><span th:text="${#dates.format(user.regtime, 'yyyy-MM-dd')}">2015-6-17</span> 加入</span>
    <i class="iconfont icon-chengshi"></i><span>来自<span th:text="${user.city}">杭州</span></span>
  </p>

  <p class="fly-home-sign" th:if="${user.signature!=null}">（<span th:text="${user.signature}">人生仿若一场修行</span>）</p>

  <div class="fly-sns" data-user="">
    <a href="javascript:;" class="layui-btn layui-btn-primary fly-imActive" data-type="addFriend">加为好友</a>
    <a href="javascript:;" class="layui-btn layui-btn-normal fly-imActive" data-type="chat">发起会话</a>
  </div>

</div>

<div class="layui-container">
  <div class="layui-row layui-col-space15">
    <div class="layui-col-md6 fly-home-jie">
      <div class="fly-panel">
        <h3 class="fly-panel-title"><span th:text="${user.nickname}">贤心</span> 最近的提问</h3>
        <ul class="jie-row">
          <li th:each="question:${questions}">
            <span class="fly-ding" th:if="${question.level==1}">顶</span>
            <span class="fly-jing" th:if="${question.level==2}">精</span>
            <a th:href="@{/question/detail(id=${question.id})}" class="jie-title"
            	th:text="${question.title}"> 基于 layui 的极简社区页面模版</a>
            <i th:text="${#dates.format(question.createtime, 'yyyy-MM-dd HH:mm:ss')}">刚刚</i>
            <em class="layui-hide-xs"><i th:text="${question.viewsnum}">1136</i>阅/<i th:text="${question.replynum}">27</i>答</em>
          </li>
          
	        <div th:if="${questions.size==0}"
	          	class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;">
          		<i style="font-size:14px;">没有发表任何求解</i>
          	</div>
        </ul>
      </div>
    </div>
    
    <div class="layui-col-md6 fly-home-da">
      <div class="fly-panel">
        <h3 class="fly-panel-title"><span th:text="${user.nickname}">贤心</span> 最近的回答</h3>
        <ul class="home-jieda">
          <li th:each="answer:${answers}">
	          <p>
	          <span th:text="${#dates.format(answer.createtime, 'yyyy-MM-dd HH:mm:ss')}">1分钟前</span>
	          在<a th:href="@{/question/detail(id=answer.qid)}" target="_blank" 
	          th:text="${answer.title}">tips能同时渲染多个吗?</a>中回答：
	          </p>
          <div class="home-dacontent" th:text="${answer.content}">
            
          </div>
        </li>
        
        
          <div class="fly-none" style="min-height: 50px; padding:30px 0; height:auto;"
          	th:if="${answers.size==0}"><span>没有回答任何问题</span></div>
        </ul>
      </div>
    </div>
  </div>
</div>

<div class="fly-footer">
  <p><a href="http://fly.layui.com/" target="_blank">Fly社区</a> 2017 &copy; <a href="http://www.layui.com/" target="_blank">layui.com 出品</a></p>
  <p>
    <a href="http://fly.layui.com/jie/3147/" target="_blank">付费计划</a>
    <a href="http://www.layui.com/template/fly/" target="_blank">获取Fly社区模版</a>
    <a href="http://fly.layui.com/jie/2461/" target="_blank">微信公众号</a>
  </p>
</div>

<script src="../../res/layui/layui.js"></script>
<script>
layui.cache.page = 'user';
layui.cache.user = {
  username: '游客'
  ,uid: -1
  ,avatar: '../../res/images/avatar/00.jpg'
  ,experience: 83
  ,sex: '男'
};
layui.config({
  version: "3.0.0"
  ,base: '../../res/mods/'
}).extend({
  fly: 'index'
}).use(['fly', 'face'], function(){
	  var $ = layui.$
	  ,fly = layui.fly;
	  //如果你是采用模版自带的编辑器，你需要开启以下语句来解析。
	  /**/
	  $('.home-dacontent').each(function(){
	    var othis = $(this), html = othis.html();
	    othis.html(fly.content(html));
	  });
	  
	});
</script>

</body>
</html>